$(document).ready(function(){
    //获取订单号
    if(getCookie("order")==""){
        alert("您最近没有需要支付的订单，去购物吧");
        location.href="list.html";
    }
    let order_id = getCookie("order");
    $.ajax({
        type: "get",
        url: "http://localhost:3301/order?id=" + order_id,
        async: false,
        success: function (e) {
            let order = e[0];
            console.log(order);
            $("#pay_name").html(order.pay_name);
            $("#total_price").html(order.total_amount);
        }
    })  
})